<?php


namespace App\Model;


use Illuminate\Database\Eloquent\Model;

class GoodsSpecRel extends Model
{
    const CREATED_AT = 'createtime';
    const UPDATED_AT = null;

    //表名
    protected $table = 'goods_spec_rel';

    //批量赋值
    protected $fillable = ['goods_id', 'spec_id', 'value_id'];

    /**
     * 关联规格组
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function spec()
    {
        return $this->belongsTo('App\Model\Spec');
    }
}
